package day15;

/**
 * 测试Circle和Cylinder类的功能
 */
public class CircleCylinderTest {
    public static void main(String[] args) {
        // 测试Circle类
        System.out.println("测试Circle类");
        Circle circle = new Circle(5.0);
        System.out.println(circle.toString());
        System.out.printf("圆的表面积: %.2f%n", circle.calculateArea());
        System.out.printf("圆的周长: %.2f%n", circle.calculatePerimeter());
    
        System.out.println();
        
        // 测试Cylinder类
        System.out.println("测试Cylinder类");
        Cylinder cylinder = new Cylinder(5.0, 10.0);
        System.out.println(cylinder.toString());
        System.out.printf("圆柱体的表面积: %.2f%n", cylinder.calculateArea());
        System.out.printf("圆柱体的周长: %.2f%n", cylinder.calculatePerimeter());
        System.out.printf("圆柱体的体积: %.2f%n", cylinder.calculateVolume());
    }
}